#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

int main() {
    int N, Q, T = 0;
    while(cin >> N >> Q && N && Q){
        ++T;
        cout << "CASE# " << T << ":\n";
        vector<int> m;
        int in;
        for (int i = 0; i < N; ++i) {
            cin >> in;
            m.push_back(in);
        }
        sort(m.begin(), m.end());
        for (int j = 0; j < Q; ++j) {
            cin >> in;
            auto p = lower_bound(m.begin(), m.end(), in);
            if(p==m.end() || *p!=in) cout << in << " not found\n";
            else cout << in << " found at " << p-m.begin()+1 << "\n";
        }
    }
    return 0;
}
